#ifndef _MESH_H_
#define _MESH_H_


class CFile;

class CMesh
{
private:
	typedef struct
	{
		u16 signature1;
		u16 signature2;
		u16 num_verts;
		u16 num_faces;
		u16 num_tverts;
	}TMeshHeader;
	
	typedef struct
	{
		fx16 x,y,z;
	}TVertex;
	
	typedef struct
	{
		fx16 u,v;
	}TCoord;
	
	typedef struct
	{
		u16 v1,v2,v3;
	}TFace;
	
	typedef struct
	{
		TVertex v1,v2,v3;
	}TNormal;
	
	TMeshHeader m_header;
	TVertex *m_verts;
	TFace *m_faces;
	TCoord *m_tverts;
	TFace *m_tfaces;
	TNormal *m_normals;
	
	
	
protected:
public:
	CMesh();
	~CMesh();
	
	BOOL load(CFile *f);
	void render();
};

#endif //_MESH_H_